package com.hczt.xhminiapp.appapi.controller;

import com.hczt.xhminiapp.appapi.resolver.CurrentDoctor;
import com.hczt.xhminiapp.appapi.service.DictService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 红创-马海强
 * @date 2019-03-04 14:56
 * @description 字典数据接口
 */
@Api(tags = "字典数据接口")
@RestController
@RequestMapping("dicts")
@Slf4j
public class DictController {

    @Autowired
    private DictService dictService;

    @GetMapping("")
    public Object queryDicts(CurrentDoctor doctor) {
        log.info("queryDicts");
        return dictService.queryDicts();
    }

    @PostMapping("")
    public Object saveDicts() {
        log.info("saveDicts");
        return "save success";
    }
}
